#include <stdio.h>
#include <unistd.h>

#ifndef HOST_NAME_MAX
#define HOST_NAME_MAX 255
#endif

int
main ()
{
  char hostname[HOST_NAME_MAX + 1];
  if(gethostname(hostname, sizeof(hostname)) == 0) {
    printf("%s", hostname);
  }
}
